package com.controller;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@Scope("prototype")
public class HelloController {

    @RequestMapping(value="/helloworld",method = RequestMethod.GET)
    public String hello(){
        System.out.println("helloworld");
        System.out.println("当前controller对象的hashCode:"+this.hashCode());
        System.out.println("当前线程的ID：" + Thread.currentThread().getId());

        return "hello"; //表示是一个视图的名字。
    }

}
